﻿

function process(tb, tbname) {
    if (!tb || !tb.columns || !tbname) return;
    tb.columns.filter(x=>["photo","file","sign","TextAndImgEdit"].includes(x.control)).forEach(c => {
        let attr = c[c.control] || {};
        attr.extData = attr.extData || {};
        attr.extData["modelName"] = attr.extData["modelName"] || (c.control=="sign"?"Sign": tbname);
        if(c.control!="sign"){
            attr.extData["thumbSize"] = attr.extData["thumbSize"] || 100;
        }
        c[c.control] = attr;
        //console.log(tbname, c.code, c.label, c);
    });
}


export { process };